{% extends "base.html" %}
{% load static %}

{% block headjs %}
<script src="/static/vendor/jquery/jquery.min.js"></script>
{% endblock %}

{% block content %}
<style>
.justify-content-between{argin: 5px 0!important;}
</style>
    <div class="row">
        <div class="col-lg">
            <div class="card">
                <div class="card-header">
  <div class="row">
    <div class="col-sm">

{#        <a type="button" class="btn btn-success" href="{% url 'Kehu_Create' %}">导入</a>#}
{#        <a type="button" class="btn btn-success" href="{% url 'Kehu_Create' %}">导出</a>#}
    </div>
    <div class="col-sm">
      <form class="form-inline my-2 my-lg-0 ml-auto" method="get" action="">
            <input class="form-control mr-sm-2" type="search" placeholder="模糊搜索" aria-label="Search" name="search">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
      </form>
    </div>
    <div class="col-sm">
        <div id="message"> </div>
    </div>
  </div>

        <div class="search-boxes">
        <!-- 为其他字段添加更多搜索框 -->
    </div>
                </div>
                <div class="card-body">
                    <div class="table-responsive">

                        <table  id="example" class="table table-striped table-bordered dt-container dt-bootstrap4" style="width:100%">
                            <thead>
                            <tr>
                                <th>客户</th>
                                <th>客户联系人</th>
                                {#  <th>联系电话</th>#}
                                 <th>客户来源</th>
                                 <th>录入时间</th>
                                 <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for kehu in kehu_gonghai_list %}
                                <tr>
                                    <td>{{ kehu.username }}</td>
                                    <td>{{ kehu.name }}</td>
                                    <td>{{ kehu.tg_qudao }}</td>
                                    <td>{{ kehu.addtime }}</td>
                                     {% include 'gonghaitemp/lingqu.html' %}
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>

                    <div class="row">



                    </div>
<div class="pagination m-2">
    <span class="step-links page-item m-2">
        {% if has_previous %}
            <a class="page-link" href="?page={{ previous_page_number }}">上一页</a>
        {% endif %}

    </span>
        <span class="current page-link m-2">
            页码 {{ page_obj.number }} / {{ page_obj.paginator.num_pages }}
        </span>
<span class="step-links page-item m-2">
        {% if has_next %}
            <a class="page-link"href="?page={{ next_page_number }}">下一页</a>
        {% endif %}
    </span>
</div>
                    </div>
                </div>
            </div>

        </div>
    </div>
{% endblock %}

{% block footerjs %}
   <script>
          document.addEventListener("DOMContentLoaded", function() {
            // 获取radio按钮元素
            var radioButton = document.getElementById("id_if_gonghai_1");
            // 设置radio按钮为选中状态
            if (radioButton) {
                radioButton.checked = true;
            }
        });
   </script>
{% endblock %}
